Optimal. Leaf size=110 \[ -\frac {1}{a c^2 x}+\frac {d^2}{c^2 (b c-a d) (c+d x)}-\frac {(b c+2 a d) \log (x)}{a^2 c^3}+\frac {b^3 \log (a+b x)}{a^2 (b c-a d)^2}-\frac {d^2 (3 b c-2 a d) \log (c+d x)}{c^3 (b c-a d)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {90}
\begin {gather*} \frac {b^3 \log (a+b x)}{a^2 (b c-a d)^2}-\frac {\log (x) (2 a d+b c)}{a^2 c^3}-\frac {d^2 (3 b c-2 a d) \log (c+d x)}{c^3 (b c-a d)^2}+\frac {d^2}{c^2 (c+d x) (b c-a d)}-\frac {1}{a c^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rubi steps
\begin {align*} \int \frac {1}{x^2 (a+b x) (c+d x)^2} \, dx &=\int \left (\frac {1}{a c^2 x^2}+\frac {-b c-2 a d}{a^2 c^3 x}+\frac {b^4}{a^2 (-b c+a d)^2 (a+b x)}-\frac {d^3}{c^2 (b c-a d) (c+d x)^2}-\frac {d^3 (3 b c-2 a d)}{c^3 (b c-a d)^2 (c+d x)}\right ) \, dx\\ &=-\frac {1}{a c^2 x}+\frac {d^2}{c^2 (b c-a d) (c+d x)}-\frac {(b c+2 a d) \log (x)}{a^2 c^3}+\frac {b^3 \log (a+b x)}{a^2 (b c-a d)^2}-\frac {d^2 (3 b c-2 a d) \log (c+d x)}{c^3 (b c-a d)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 111, normalized size = 1.01 \begin {gather*} -\frac {1}{a c^2 x}+\frac {d^2}{c^2 (b c-a d) (c+d x)}+\frac {(-b c-2 a d) \log (x)}{a^2 c^3}+\frac {b^3 \log (a+b x)}{a^2 (-b c+a d)^2}+\frac {\left (-3 b c d^2+2 a d^3\right ) \log (c+d x)}{c^3 (b c-a d)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 111, normalized size = 1.01
method | result | size |
default | \(\frac {b^{3} \ln \left (b x +a \right )}{a^{2} \left (a d -b c \right )^{2}}-\frac {d^{2}}{c^{2} \left (a d -b c \right ) \left (d x +c \right )}+\frac {d^{2} \left (2 a d -3 b c \right ) \ln \left (d x +c \right )}{c^{3} \left (a d -b c \right )^{2}}-\frac {1}{a \,c^{2} x}+\frac {\left (-2 a d -b c \right ) \ln \left (x \right )}{a^{2} c^{3}}\) | \(111\) |
norman | \(\frac {\frac {\left (-2 a \,d^{3}+b c \,d^{2}\right ) x}{c^{2} d a \left (a d -b c \right )}-\frac {1}{a c}}{\left (d x +c \right ) x}+\frac {b^{3} \ln \left (b x +a \right )}{a^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}+\frac {d^{2} \left (2 a d -3 b c \right ) \ln \left (d x +c \right )}{c^{3} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}-\frac {\left (2 a d +b c \right ) \ln \left (x \right )}{a^{2} c^{3}}\) | \(155\) |
risch | \(\frac {-\frac {d \left (2 a d -b c \right ) x}{a \,c^{2} \left (a d -b c \right )}-\frac {1}{a c}}{\left (d x +c \right ) x}+\frac {b^{3} \ln \left (b x +a \right )}{a^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}-\frac {2 \ln \left (-x \right ) d}{a \,c^{3}}-\frac {\ln \left (-x \right ) b}{a^{2} c^{2}}+\frac {2 d^{3} \ln \left (-d x -c \right ) a}{c^{3} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}-\frac {3 d^{2} \ln \left (-d x -c \right ) b}{c^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}\) | \(195\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 177, normalized size = 1.61 \begin {gather*} \frac {b^{3} \log \left (b x + a\right )}{a^{2} b^{2} c^{2} - 2 \, a^{3} b c d + a^{4} d^{2}} - \frac {{\left (3 \, b c d^{2} - 2 \, a d^{3}\right )} \log \left (d x + c\right )}{b^{2} c^{5} - 2 \, a b c^{4} d + a^{2} c^{3} d^{2}} - \frac {b c^{2} - a c d + {\left (b c d - 2 \, a d^{2}\right )} x}{{\left (a b c^{3} d - a^{2} c^{2} d^{2}\right )} x^{2} + {\left (a b c^{4} - a^{2} c^{3} d\right )} x} - \frac {{\left (b c + 2 \, a d\right )} \log \left (x\right )}{a^{2} c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 287 vs.
\(2 (110) = 220\).
time = 4.50, size = 287, normalized size = 2.61 \begin {gather*} -\frac {a b^{2} c^{4} - 2 \, a^{2} b c^{3} d + a^{3} c^{2} d^{2} + {\left (a b^{2} c^{3} d - 3 \, a^{2} b c^{2} d^{2} + 2 \, a^{3} c d^{3}\right )} x - {\left (b^{3} c^{3} d x^{2} + b^{3} c^{4} x\right )} \log \left (b x + a\right ) + {\left ({\left (3 \, a^{2} b c d^{3} - 2 \, a^{3} d^{4}\right )} x^{2} + {\left (3 \, a^{2} b c^{2} d^{2} - 2 \, a^{3} c d^{3}\right )} x\right )} \log \left (d x + c\right ) + {\left ({\left (b^{3} c^{3} d - 3 \, a^{2} b c d^{3} + 2 \, a^{3} d^{4}\right )} x^{2} + {\left (b^{3} c^{4} - 3 \, a^{2} b c^{2} d^{2} + 2 \, a^{3} c d^{3}\right )} x\right )} \log \left (x\right )}{{\left (a^{2} b^{2} c^{5} d - 2 \, a^{3} b c^{4} d^{2} + a^{4} c^{3} d^{3}\right )} x^{2} + {\left (a^{2} b^{2} c^{6} - 2 \, a^{3} b c^{5} d + a^{4} c^{4} d^{2}\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.05, size = 150, normalized size = 1.36 \begin {gather*} \frac {b^{3} d \log \left ({\left | b - \frac {b c}{d x + c} + \frac {a d}{d x + c} \right |}\right )}{a^{2} b^{2} c^{2} d - 2 \, a^{3} b c d^{2} + a^{4} d^{3}} + \frac {d^{5}}{{\left (b c^{3} d^{3} - a c^{2} d^{4}\right )} {\left (d x + c\right )}} + \frac {d}{a c^{3} {\left (\frac {c}{d x + c} - 1\right )}} - \frac {{\left (b c d + 2 \, a d^{2}\right )} \log \left ({\left | -\frac {c}{d x + c} + 1 \right |}\right )}{a^{2} c^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.71, size = 157, normalized size = 1.43 \begin {gather*} \frac {b^3\,\ln \left (a+b\,x\right )}{a^4\,d^2-2\,a^3\,b\,c\,d+a^2\,b^2\,c^2}-\frac {\frac {1}{a\,c}+\frac {x\,\left (2\,a\,d^2-b\,c\,d\right )}{a\,c^2\,\left (a\,d-b\,c\right )}}{d\,x^2+c\,x}+\frac {\ln \left (c+d\,x\right )\,\left (2\,a\,d^3-3\,b\,c\,d^2\right )}{a^2\,c^3\,d^2-2\,a\,b\,c^4\,d+b^2\,c^5}-\frac {\ln \left (x\right )\,\left (2\,a\,d+b\,c\right )}{a^2\,c^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________